<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vue.js"></script>
</head>

<body>
    <!-- 定义挂载点 -->
    <div id="app">
        <v-one></v-one>
        <v-two></v-two>
        <v-three></v-three>
    </div>


    <template id="three">
        <div>
            <h2>我是一个标题</h2>
            <ul>
                <li>列表</li>
                <li>列表</li>
                <li>列表</li>
            </ul>
        </div>
    </template>


    <script>
        new Vue({
            //挂载点
            el: "#app",
            //数据
            data: {},
            //方法
            methods: {},
            components: {
                vOne: {
                    template: "<div> this is div</div>"
                },
                // 1.template只能有一个根标签
                vTwo: {
                    template: `
                        <div> 
                            <h4>我是h4</h4>
                            <h3>this is two {{1+1}}</h3>
                        </div> 
                      `
                },
                //2.可以借助template标签来书写template选项
                vThree:{
                    template:"#three"
                }
            }
        })
    </script>
</body>

</html>